package com.leaf.spring.y201906.day13.autowired;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class LeafController {

	@Autowired
	private Leaf leafService;

	// @PostConstruct注解的方法将会在依赖注入完成后被自动调用
	// Constructor >> @Autowired >> @PostConstruct
	// @PreDestroy 在destroy() 方法之后执行
	@PostConstruct
	public void init() {
		System.out.println(leafService.getClass().getName());
	}

}
